﻿using Max.PH4_2102A.Shopping.Domain;
using Max.PH4_2102A.Shopping.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4_2102A.Shopping.IService
{
    /// <summary>
    /// 订单主表的服务接口
    /// </summary>
    public interface IOrderMasterService
    {

        #region 物流订单及订单统计

        /// <summary>
        /// 获取所有订单数据
        /// </summary>
        /// <param name="orderNo"></param>
        /// <param name="name"></param>
        /// <param name="state"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        dynamic GetOrderData(string orderNo, string name, int state,
            int pageIndex, int pageSize, out int total);

        dynamic GetOrderDetailAndLogistic(string orderNo);

        dynamic GetOrderSaleAmount();

        #endregion

        IQueryable<OrderOuputDto> GetOrderList(string orderNo);
        dynamic GetOrderAll(string orderNo, int state, int pageIndex, int pageSize, out int total);

        /// <summary>
        /// 直接用EF和DTO参数实现
        /// </summary>
        /// <param name="dto"></param>
        void CreateOrderByDto(OrderInputDto dto);

        /// <summary>
        /// 用工作单元和DTO参数实现
        /// </summary>
        /// <param name="dto"></param>
        void CreateOrderByUnitOfWork(OrderInputDto dto);

        /// <summary>
        /// 用EF和实体参数实现
        /// </summary>
        /// <param name="master"></param>
        /// <param name="details"></param>
        void CreateOrderByEntity(OrderMasterEntity master, List<OrderDetailEntity> details);
    }
}
